#ifdef DEBUG

#define bool	int
#define true	1
#define false	0

typedef struct BLOCKINFO
{
    struct BLOCKINFO *pbiNext;
    char *pc;
    size_t size;
    bool bReferenced;
}blockinfo;

bool bCreateBlockInfo(char *pcNew, size_t sizeNew);
void FreeBlockInfo(char *pcToFree);
void UpdateBlockInfo(char *pcOld, char *pcNew, size_t sizeNew);
size_t sizeofBlock(char *pc);

void ClearMemoryRefs(void);
void NoteMemoryRef(void *pv);
void CheckMemoryRefs(void);
bool bValidPointer(void *pv, size_t size);

#endif
